﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>@ViewBag.Title - MVC Grid</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <!-- Le styles -->
    <link href="/App_Themes/TwitterBootstrap/Styles/bootstrap.css" rel="stylesheet">
    <style>
        body
        {
            padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
        }
    </style>
    <link href="/App_Themes/TwitterBootstrap/Styles/bootstrap-responsive.css" rel="stylesheet">
    <link href="/Scripts/Tags2/bootstrap-tagmanager.css" rel="stylesheet">
    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="/Scripts/TwitterBootstrap/html5.js" type="text/javascript"></script>
    <![endif]-->
    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="/App_Themes/TwitterBootstrap/Styles/img/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/App_Themes/TwitterBootstrap/Styles/img/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/App_Themes/TwitterBootstrap/Styles/img/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/App_Themes/TwitterBootstrap/Styles/img/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="/App_Themes/TwitterBootstrap/Styles/img/apple-touch-icon-57-precomposed.png">
</head>
<body>
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container">
                <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span
                    class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
                </a><a class="brand" href="@Url.Content("~/")">MVC CRUD DEMO</a>
                <div class="nav-collapse collapse">
                    <ul class="nav">
                        <li>@Html.ActionLink("View Grid", "Index", "Product")</li>
                        <li>@Html.ActionLink("Create Product", "Create", "Product")</li>
                        <li>@Html.ActionLink("HTML EDITOR", "HTMLEditor", "Product")</li>
                        <li>@Html.ActionLink("Tags", "Tags", "Product")</li>
                    </ul>
                </div>
                <!--/.nav-collapse -->
            </div>
        </div>
    </div>
    @*@RenderSection("featured", required: false)*@
    @RenderBody()
    <!-- /container -->
    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="/Scripts/TwitterBootstrap/jquery.js" type="text/javascript"></script>
    <script src="/Scripts/TwitterBootstrap/bootstrap-transition.js" type="text/javascript"></script>
    <script src="/Scripts/TwitterBootstrap/bootstrap-alert.js" type="text/javascript"></script>
    <script src="/Scripts/TwitterBootstrap/bootstrap-modal.js" type="text/javascript"></script>
    <script src="/Scripts/TwitterBootstrap/bootstrap-dropdown.js" type="text/javascript"></script>
    <script src="/Scripts/TwitterBootstrap/bootstrap-scrollspy.js" type="text/javascript"></script>
    <script src="/Scripts/TwitterBootstrap/bootstrap-tab.js" type="text/javascript"></script>
    <script src="/Scripts/TwitterBootstrap/bootstrap-tooltip.js" type="text/javascript"></script>
    <script src="/Scripts/TwitterBootstrap/bootstrap-popover.js" type="text/javascript"></script>
    <script src="/Scripts/TwitterBootstrap/bootstrap-button.js" type="text/javascript"></script>
    <script src="/Scripts/TwitterBootstrap/bootstrap-collapse.js" type="text/javascript"></script>
    <script src="/Scripts/TwitterBootstrap/bootstrap-carousel.js" type="text/javascript"></script>
    <script src="/Scripts/TwitterBootstrap/bootstrap-typeahead.js" type="text/javascript"></script>
    <style type="text/css">
        .editor-field
        {
            width: 500px;
        }
    </style>
    @*<link href="/App_Themes/Admin.css" rel="stylesheet">*@ @*
    http://welldonethings.com/tags/manager
    https://github.com/max-favilli/tagmanager
    http://stackoverflow.com/questions/2858121/convert-javascript-comma-separated-string-into-an-array
    TAGS
    *@
    <script type="text/javascript" src="/Scripts/Tags2/bootstrap-tagmanager.js"></script>
    <script type="text/javascript" src="/Scripts/Tags2/bootstrap-tagmanager.js"></script>
    <script type="text/javascript">

        //var name = document.getElementById("TAGS").value;
        //alert(name);
        //        jQuery(".tagManager").tagsManager();
        //jQuery(".tagManager").tagsManager();
        //       jQuery(".tagManager").tagsManager({
        //                    prefilled: ["Pisa", "Rome"],
        //                    CapitalizeFirstLetter: true,
        //                    preventSubmitOnEnter: true,
        //                    typeahead: true,
        //                    typeaheadAjaxSource: null,
        //                    typeaheadSource: ["Pisa", "Rome", "Milan", "Florence", "New York", "Paris", "Berlin", "London", "Madrid"],
        //                    delimeters: [44, 188, 13],
        //                    backspace: [8],
        //                    blinkBGColor_1: '#FFFF9C',
        //                    blinkBGColor_2: '#CDE69C'
        //                });

        if (document.getElementById("TAGS") != null) {

            //TAG manager needs the values in a tab delimited list like this
            var str = document.getElementById("TAGS").value;
            temp = str.split(",");

            //alert(temp);

            document.getElementById("TAGS").className = document.getElementById("TAGS").className + "tagManager"; //Adds tag manager class to the field
            jQuery(".tagManager").tagsManager({
                prefilled: temp,
                CapitalizeFirstLetter: true,
                preventSubmitOnEnter: true,
                typeahead: true,
                typeaheadAjaxSource: null,
                delimeters: [44, 188, 13],
                backspace: [8],
                blinkBGColor_1: '#FFFF9C',
                blinkBGColor_2: '#CDE69C'
            });
        };


        if (document.getElementById("CreateDate") != null) {

            $(function () {
                $("#CreateDate").datepicker();
            });

        };

    </script>
</body>
</html>
